<?php echo $javascript->link('jquery-1.3.2.min.js', false); ?>
<?php echo $javascript->link('jquery.pager.js', false); ?>
<?php echo $javascript->link('jquery-ui-1.7.2.custom.min.js', false); ?>


<div class="leftbar leftlink">
</div>

<div class="maincontent filelist">
<div id="flashMessageWrapper"><?php $session->flash(); ?></div>
<?php if (!empty($collections_info)) {
        $i = 0; 
        foreach ($collections_info as $name => $entry) { ?>
    <div class="filebox ui-widget ui-widget-content ui-corner-all">
    	<div class="file-header ui-widget-header">
            <div style="float: left">
            <?php echo ++$i; ?>
            <?php echo $html->link($entry->Name, "/ftpfiles/detail/{$entry->b64filename}"); ?>
            </div>
            <div class="user-action">
                <?php if ($entry->is_dir()): ?>
                    <a href="<?php echo $html->url('/ftpfiles/download_from_ftp/'.$entry->b64filename);?>" class="fg-button ui-state-default" title="<?php __('FTP Browse'); ?>"><span class="ui-icon ui-icon-folder-open"></span></a>
                    <a href="<?php echo $html->url('/ftpfiles/download_as_zip/'.$entry->b64filename);?>" class="fg-button ui-state-default" title="<?php __('Download as ZIP'); ?>"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></a>
                <?php else: ?>
                    <a href="<?php echo $html->url('/ftpfiles/download_from_ftp/'.$entry->b64filename);?>" class="fg-button ui-state-default" title="<?php __('Download from FTP'); ?>"><span class="ui-icon ui-icon-disk"></span></a>
                <?php endif; ?>
            </div>
            <span class="admin-action">
                <a class="fg-button ui-state-default ui-corner-all"
                   href='<?php echo $html->url("/collections/del_collect/{$entry->b64filename}"); ?>'
                   title="<?php __('Delete'); ?>">
                    <span class="ui-icon ui-icon-trash"></span>
                </a>
            </span>
            <hr style="clear: both; height: 0; border: 0"/>
        </div>
        <span class="file-type"><label>类型:</label> <?php echo $entry->is_dir() ? '文件夹' : '文件'; ?></span>
        <span class="file-mtime"><label>修改时间:</label> <?php echo date('Y-m-d H:i:s', $entry->mtime);?></span>
        <span class="file-size"><label>大小:</label> <?php echo $ftpman->smart_size($entry->Size);?></span>
        <div class="description"><?php echo $entry->Description; ?></div>
    </div>
    <?php }} ?>
</div>
